package com.example.saiaadmin.entry;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 定时任务执行日志表
 *
 *  @author  Vagrant
 * @since 2025/01/13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EbSystemCrontabLog implements Serializable {
    @Serial
    private static final long serialVersionUID = 4792225948338379511L;
    /**
     * 主键
     */
    private Integer id;
    /**
     * 任务ID
     */
    private Integer crontabId;
    /**
     * 任务名称
     */
    private String name;
    /**
     * 任务调用目标字符串
     */
    private String target;
    /**
     * 任务调用参数
     */
    private String parameter;
    /**
     * 异常信息
     */
    private String exceptionInfo;
    /**
     * 执行状态 (1成功 2失败)
     */
    private Integer status;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 删除时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deleteTime;
}